home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / tex / mf / inputs / dc / dxsign.mf < prev    next >
Text File  |  1994-04-12  |  9KB  |  214 lines

  1. % This is DXSIGN.MF in text format, as of March 24, 1992
  2. %
  3. % DC fonts Version 1.1 (prerelease of EC fonts)
  4. %
  5. %          [ heavily borrowed from the Computer Modern Roman family of
  6. %            fonts by D. E. Knuth ]
  7. %
  8. % Content:
  9. %
  10. %   special characters common to roman and italic style fonts
  11. %
  12. %
  13.  
  14. dcchar "Zero for p mille sign";
  15. beginchar(oct"030",if serifs:
  16.    if monospace: 9u#+max(6u#,2fudge*(hair#+stem#)) else: 7u# fi else: 8u# fi,
  17.   body_height#,body_height#-asc_height#);
  18. italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi;
  19. adjust_fit(0,0); pickup fine.nib;
  20. numeric left_curve,right_curve;
  21. left_curve=hround 5/6[fudged.hair,fudged.stem];
  22. right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
  23. pos1(vair,90);
  24. pos2(left_curve,180);
  25. pos3(vair,270);
  26. pos4(right_curve,360);
  27. bot y3r=-d;
  28. rt x4r=hround(.5w +2.5u );
  29. lft x2r=hround(.5w -2.5u ) ;
  30. top y1r=vround(if monospace: .3 else: .5 fi\\ asc_height);
  31. x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3];
  32. filldraw stroke pulled_super_arc.e(1,2)(superpull)
  33.  & pulled_super_arc.e(2,3)(superpull);  % left half of lower bowl
  34. filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of lower bowl
  35. penlabels(1,2,3,4); endchar;
  36.  
  37.  
  38. dcchar "Straight double quotes";
  39. beginchar(oct"042",9u#,asc_height#,0);
  40. numeric top_width#,spread#;
  41. top_width#=if serifs: flare# else: stem# fi;
  42. spread#=max(3u#,top_width#+.5u#); define_pixels(spread);
  43. italcorr asc_height#*slant+.5top_width#+.5spread#-4u#;
  44. adjust_fit(0,0);
  45. x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3;
  46. y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height);
  47. if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0);
  48.  pos3(flare,0); pos4(vair,0);
  49.  y1+.5stem=h; filldraw circ_stroke z1e--z2e;  % left stem and bulb
  50.  filldraw circ_stroke z3e--z4e;  % right stem and bulb
  51. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  52.  pos3(stem,0); pos4(vair,0);
  53.  top y1=h; filldraw stroke z1e--z2e;  % left stem
  54.  filldraw stroke z3e--z4e; fi  % right stem
  55. penlabels(1,2,3,4); endchar;
  56.  
  57.  
  58. dcchar "Hash mark (number sign)";
  59. if monospace: compute_spread(.6x_height#,.7x_height#);
  60. else: compute_spread(.45x_height#,.55x_height#); fi
  61. beginchar("#",15u#,asc_height#,asc_depth#);
  62. italcorr (math_axis#+.5(spread#+rule_thickness#))*slant-.5u#;
  63. adjust_fit(0,0);
  64. pickup extra_rule.nib; lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
  65. y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
  66. draw z1--z2;  % upper bar
  67. draw z3--z4;  % lower bar
  68. lft x6=hround 3u; rt x7=hround(w-3u); x5-x6=x7-x8;
  69. x8=good.x if monospace: .6 else: .5 fi\\w;
  70. top y5=top y7=h+eps; bot y6=bot y8=-d-eps;
  71. y15=y1; z15=whatever[z5,z6]; y36=y3; z36=whatever[z5,z6];
  72. y27=y2; z27=whatever[z7,z8]; y48=y4; z48=whatever[z7,z8];
  73. draw z5--if x5>x6+1:(good.x(x15+.5),y1)--(good.x(x15-.5),y1)
  74.  --(good.x(x36+.5),y3)--(good.x(x36-.5),y3)--fi\\z6;  % left diagonal
  75. draw z7--if x7>x8+1:(good.x(x27+.5),y2)--(good.x(x27-.5),y2)
  76.  --(good.x(x48+.5),y4)--(good.x(x48-.5),y4)--fi\\z8;  % right diagonal
  77. labels(1,2,3,4,5,6,7,8,15,27,36,48); endchar;
  78.  
  79. dcchar "Dollar sign";
  80. beginchar("$",9u#,body_height#,body_height#-asc_height#);
  81. italcorr fig_height#*slant-.5u#; % same as for digits
  82. adjust_fit(0,0);
  83. numeric theta; theta=90-angle(50u,asc_height); slope:=-asc_height/50u;
  84. pickup fine.nib; pos2(slab,-90);
  85. pos0(cap_stem,theta); pos7(slab,-90);
  86. x2=x0=x7=.5w; top y2l=asc_height+oo; bot y7r=-oo;
  87. y0=.52asc_height; lft x3l=hround u; rt x6r=hround(w-u);
  88. x3r-x3l=x6r-x6l=hround .35[slab,cap_stem]-fine;
  89. ellipse_set(2l,3l,4l,0l); ellipse_set(2r,3r,4r,0r); y3=y3r;
  90. ellipse_set(7l,6l,5l,0l); ellipse_set(7r,6r,5r,0r); y6=y6r;
  91. filldraw stroke super_arc.e(2,3) & z3e{down}
  92.  ..z4e---z5e..z6e{down} & super_arc.e(6,7);  % main stroke
  93. if serifs: pos1(hair,0); pos8(hair,180);
  94.  pos10(flare,0); pos9(flare,180);
  95.  rt x1r=hround(w-u); lft x8r=hround u; y1=.5[y0,y2]; y8=.5[y0,y7];
  96.  {{less_tense; pos2'(slab,90); z2'=z2; bulb(2',1,10);  % upper arc and bulb
  97.  bulb(7,8,9)}};  % lower arc and bulb
  98. else: pos1(.6[slab,flare],-100); pos8(flare,-100);
  99.  rt x1l=hround(w-1.3u); lft x8r=hround .8u;
  100.  top y1l=vround .92asc_height+oo; bot y8r=vround .1asc_height-oo;
  101.  filldraw stroke term.e(2,1,right,.9,4);  % upper arc and terminal
  102.  filldraw stroke term.e(7,8,left,1,4); fi  % lower arc and terminal
  103. pickup crisp.nib; pos12(bar,0); pos11(bar,0);
  104. lft x12l=lft x11l=hround(.5w-.5bar); top y12=h; bot y11=-d;
  105. filldraw stroke z12e--z11e;  % vertical crossbar
  106. penlabels(0,1,2,3,4,5,6,7,8,9,10,11,12); endchar;
  107.  
  108.  
  109.  
  110. dcchar "Per cent sign";
  111. beginchar("%",9u#+max(6u#,2fudge*(hair#+stem#)),
  112.   body_height#,body_height#-asc_height#);
  113. italcorr if hefty: .4asc_height#*slant-.5u# else: h#*slant-u# fi;
  114. adjust_fit(0,0); pickup fine.nib;
  115. numeric left_curve,right_curve;
  116. left_curve=hround 5/6[fudged.hair,fudged.stem];
  117. right_curve=max(fine.breadth,hround(fudged.hair if hefty:-2stem_corr fi));
  118. pos1(vair,90); pos2(left_curve,180); pos3(vair,270); pos4(right_curve,360);
  119. top y1r=h; lft x2r=hround u; rt x4r=hround(.5w-1.5u);
  120. bot y3r=floor(if monospace: .7 else: .5 fi\\ asc_height);
  121. x1=x3=.5[x2,x4]; y2=y4=.5[y1,y3];
  122. filldraw stroke pulled_super_arc.e(1,2)(superpull)
  123.  & pulled_super_arc.e(2,3)(superpull);  % left half of upper bowl
  124. filldraw stroke super_arc.e(3,4) & super_arc.e(4,1); % right half of upper bowl
  125. pos5(vair,90); pos6(left_curve,180); pos7(vair,270); pos8(right_curve,360);
  126. bot y7r=-d; rt x8r=hround(w-u); lft x6r=hround(.5w+1.5u);
  127. top y5r=vround(if monospace: .3 else: .5 fi\\ asc_height);
  128. x5=x7=.5[x6,x8]; y6=y8=.5[y5,y7];
  129. filldraw stroke pulled_super_arc.e(5,6)(superpull)
  130.  & pulled_super_arc.e(6,7)(superpull);  % left half of lower bowl
  131. filldraw stroke super_arc.e(7,8) & super_arc.e(8,5); % right half of lower bowl
  132. pickup rule.nib; top y9=h; bot y10=-d;
  133. if hefty: x9=good.x(x5-eps); x10=good.x(x1+eps);
  134.  draw z9--z10;  % diagonal
  135. else: rt x9=hround(w-2.5u); lft x10=hround 2.5u; draw z9--z10;  % diagonal
  136.  pickup fine.nib; pos9(rule_thickness,angle(z9-z10)+90);
  137.  pos11(vair,angle(z1r-z4r)-90); pos12(vair,angle(z9-z10)+90);
  138.  path p; p=super_arc.r(1,4); z11r=point 2/3 of p; z12r=z9r;
  139.  filldraw stroke z11e{direction 2/3 of p}...{z9-z10}z12e; fi  % link
  140. penlabels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;
  141.  
  142. dcchar "At sign";
  143. beginchar("@",14u#,asc_height#,0);
  144. italcorr .7asc_height#*slant-.5u#;
  145. adjust_fit(0,if hefty or monospace:-2u# else: 0 fi);
  146. pickup fine.nib; pos0(fudged.hair,0); pos1(vair,90);
  147. pos2(fudged.stem,180); pos3(vair,270);
  148. pos4(fudged.stem,-180); pos5(fudged.stem,-180);
  149. pos6(vair,-90); pos7(fudged.hair,0);
  150. pos8(vair,90); pos9(fudged.hair,180);
  151. pos10(vair,270); pos11(.5[vair,flare],360);
  152. x1=x3=.5[x0,x2]; y0=y2=.5[y1,y3];
  153. x8=x10=.5w; y7=y9=.5[y8,y10];
  154. lft x9r=hround u; x7=w-x9; top y8r=h+oo; bot y10r=-oo;
  155. top y1r=vround(.8[y10,y8]+.5vair); bot y3r=vround(.2[y10,y8]-.5vair);
  156. x6l=1/3[x5l,x7l]; y6=y3; y11=good.y(.1[y10,y8]-.5);
  157. x0=x4=x5; y4=.8[y3,y1]; y5=2/3[y7,y6];
  158. if hefty or monospace: lft x2r=hround(5u-.5fudged.stem);
  159.  rt x0r=hround(w-3u); x11r=x0r;
  160. else: lft x2r=hround 3.4u; x0=w-x2; x11r=x7r; fi
  161. filldraw stroke super_arc.e(1,2) & super_arc.e(2,3);  % left inner bowl
  162. filldraw stroke super_arc.e(3,0) & super_arc.e(0,1);  % right inner bowl
  163. filldraw stroke super_arc.e(8,9) & super_arc.e(9,10)
  164.  & term.e(10,11,right,1,4);  % left outer bowl and terminal
  165. if hefty or monospace: {{interim superness:=hein_super;
  166.   filldraw stroke super_arc.e(0,8)}};  % link
  167. else: (x,y6r)=whatever[z6l,z7l]; x6r:=x;
  168.  filldraw stroke z4e---z5e...z6e{right}...{up}z7e
  169.   & super_arc.e(7,8); fi % stem and link
  170. penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
  171.  
  172. dcchar "Sterling sign";
  173. beginchar(oct"277",12u#,asc_height#,0);
  174. adjust_fit(0,.75asc_height#*slant-.5u#); pickup fine.nib;
  175. pos0(flare,0); pos1(hair,0); pos2(vair,90); pos3(stem,180);
  176. pos4(stem,180); pos4'(stem,0); pos5(vair,-90); z4'=z4;
  177. x2=2/3w-.5u; rt x3l=rt x4l=hround(.5w-u+.5stem); x5=2.5u;
  178. y1=y3=.75h; top y2=h+oo; y4=.25h; bot y5r=-oo;
  179. rt x1r=hround(w-1.5u); bulb(2,1,0);  % bulb
  180. filldraw stroke pulled_arc.e(2,3)..z4e;  % stem
  181. numeric light_stem; light_stem=2/3[vair,vstem];
  182. pos6(.5[hair,light_stem],-180); pos7(light_stem,-300);
  183. pos8(light_stem,-300); pos9(hair,-180);
  184. lft x6r=hround u; x7=3u; x8=w-3.5u; rt x9r=hround(w-u);
  185. y6=.4[y5,y7]; top y7r=vround .2h; bot y8l=-oo; y9=good.y .2h;
  186. filldraw stroke pulled_arc.e(4',5)...z6e{up}...z7e{right}
  187.  ..{right}z8e...{up}z9e;  % loop and arm
  188. pos10(bar,90); pos11(bar,90); x10=3u; x11=w-4.5u;
  189. top y10r=top y11r=vround(.5h+.5bar); filldraw stroke z10e--z11e;  % bar
  190. penlabels(1,2,3,4,5,6,7,8,9,10,11); endchar;
  191.  
  192.  
  193. dcchar "Section sign";
  194. beginchar(oct"237",6.5u#+max(1.5u#,stem#),asc_height#,desc_depth#);
  195. adjust_fit(0,0); pickup fine.nib;
  196. numeric sstem; sstem=hround .75[hair,stem];
  197. pos0(stem,0); pos1(hair,0); pos2(vair,90); pos3(sstem,180); pos4(vair,270);
  198. pos5'(sstem,0); pos5(sstem,180);
  199. pos6(vair,90); pos7(sstem,0); pos8(vair,-90); pos9(hair,-180); pos10(stem,-180);
  200. top y2r=h+oo; bot y8r=-d-oo; y2-y1=y9-y8=(y2-y8)/8;
  201. y3=.52[y4,y2]; y5=.52[y4,y6]; y7=.52[y6,y8]; y5'=.52[y6,y4];
  202. y2-y4=y4-y6=y6-y8;
  203. rt x1r=hround(w-1.5u); lft x3r=hround 1.25u;
  204. x2=x4=x6=x8=.5w; x5=x7=w-x3; x5'=x3; x9=w-x1;
  205. bulb(2,1,0); bulb(8,9,10);  % bulbs
  206. filldraw stroke z2e{left}...z3e{down}...z4e{3(x5-x3),y5-y3}
  207.  ...z5e{down}...{left}z6e;  % upper stroke
  208. filldraw stroke z4e{left}...z5'e{down}...z6e{3(x7-x5'),y7-y5'}
  209.  ...z7e{down}...{left}z8e;  % upper stroke
  210. penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
  211.  
  212. endinput;
  213.  
  214.